<?php
/**
 * Created by PhpStorm.
 * User: Aliaksei Lazerka
 * Date: 10/7/14
 * Time: 5:04 PM
 */

namespace controller;

if (!defined('NYMPH_ROOT')) {
  define('NYMPH_ROOT', dirname("../../../" . __FILE__));
  require(NYMPH_ROOT . '/local/loader/kernel/classes/URLClassLoader.php');
}


class WebConfig
{

  /**
   * @var Action $action handler
   */
  private $action;

  /**
   * @var Model $model handler
   */
  private $model;

  /**
   * @var View $view client page
   */
  private $view;

  /**
   * @var array Filter $filters client page
   */
  private $filters;


  /**
   * @return Model
   */
  public function getModel()
  {
    return $this->model;
  }

  /**
   * @param Model $model
   */
  public function setModel($model)
  {
    $this->model = $model;
  }

  /**
   * @return View
   */
  public function getView()
  {
    return $this->view;
  }

  /**
   * @param View $view
   */
  public function setView($view)
  {
    $this->view = $view;
  }

  /**
   * @return Action
   */
  public function getAction()
  {
    return $this->action;
  }

  /**
   * @return Action
   */
  public function getActionName()
  {
    return $this->action->getName();
  }

  /**
   * @param Action $action
   */
  public function setAction($action)
  {
    $this->action = $action;
  }

  /**
   * @return array
   */
  public function getFilters()
  {
    return $this->filters;
  }

  /**
   * @param array $filters
   */
  public function setFilters($filters)
  {
    $this->filters = $filters;
  }

  /**
   * @param Filter $filter
   */
  public function addFilter($filter)
  {
    $this->filters[] = $filter;
  }


} 